<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    function Person(name,age,sex){
        this.name = name
        this.age = age
        this.sex = sex
    }
    Person.prototype.setName = function (name) {
        this.name = name
    }

    function Student(name,age,score){
        Person.call(this,name,age)
        this.score = score
    }
    // Student.prototype = new Person()
    // Student.prototype.constructor = Student
    Student.prototype.__proto__ = Person.prototype
    let  s = new Student('张三',12,111)
    console.log(s)

</script>
</body>
</html>